Skip to content

systems.hpp - initial multi-host implementation #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

mox669
Copy link

@mox669 mox669 commented Dec 8, 2023

BMCWEB multi-host implementation

In order to support class 1 multi-host server configurations (i.e. yosemite v3, 1 BMC, N hosts), this change enables bmcweb to gather information on multiple available hosts and handle the information accordingly.
The implementation is based on an already taken - and now abondened - effort from earlier this year as can be seen on gerrit:

The redfish core library api has only support for bmc system with
single host/computer system. The platforms with multiple hosts cannot
be discovered and computer system specific redfish queries is not
supported with the current implementation.

This change adds initial support to discover and populate multihost
systems as well as single host systems and support some system info
queries. The host systems discovery is based on number of host power
state instances.(xyz.openbmc_project.State.Host).

The multi-host computer system discovery is placed under meson option
"unstable-redfish-multi-computer-system". by default this is option
is disabled.In this case existing single host computer system
discovery implementation is unaffected.

The redfish url for single host system is represented by the name
"system".

i.e : /redfish/v1/Systems/system

The multi host system uses the same name with host number at the end.

/redfish/v1/Systems/system1
/redfish/v1/Systems/system2
.
.
/redfish/v1/Systems/systemN

The change expects no impact on current single host implementation.
It only extends the support for multihost bmc systems.

The current changes are only a subset of the patches to come, to fully implement multi host support.

Reviewing

The bmcweb devs wrote a document on common errors. Since I am new to cpp, I might misunderstood or unintentionally ignored one or two of these common errors. Might be good to have a look at the document and have it ready for reviewing.

Testing

NOTE: real hardware testing hasn't been performed yet!
Changes were tested in QEMU with the romulus image by IBM. After successful compilation of bmcweb on local machine,
the resulting patch file has been appended to the yocto build system in meta-ibm/meta-romulus/recipes-phosphor/interfaces/bmcweb.

In general, all Redfish routes touched by the change need to be tested - for both - single-host- and multi-host-configuration to ensure that we don't break the single-host configuration. This means, we have to test the implementation twice (enabling/ disabling -Dexperimental-redfish-multi-computer-system in bmcweb_%.bbappend).
In order to automate this process to some extend, the scripts/test-all-routes.sh curls every route for you, and stores the response in a file that you have to specify as argument to the script. Afterwards you have to compare the response to the expected output:

Expected response

Expected response single host
- GET /redfish/v1/Systems
  Response should contain one system called "system"
- GET /redfish/v1/Systems/system
  Response should contain all information for system called "system"
- GET /redfish/v1/Systems/system0
  Response should contain all information for system called "system"
- GET /redfish/v1/Systems/system1
  Should return 404 resource not found error
- GET /redfish/v1/Systems/foobar
  Should return 404 resource not found error
- GET /redfish/v1/Systems/sysem0
  Should return 404 resource not found error

- GET /redfish/v1/Systems/system/ResetActionInfo
  Response should contain all ResetAction information for system called "system"
- GET /redfish/v1/Systems/system0/ResetActionInfo
  Response should contain all ResetAction information for system called "system"
- GET /redfish/v1/Systems/system1/ResetActionInfo
  Should return 404 resource not found error
- GET /redfish/v1/Systems/foobar/ResetActionInfo
  Should return 404 resource not found error
- GET /redfish/v1/Systems/sysem0/ResetActionInfo
  Should return 404 resource not found error

- POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset
  Should return 200 OK
- POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset
  Should return 200 OK
- POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset
  Should return 404 resource not found error
- POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset
  Should return 404 resource not found error
- POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset
  Should return 404 resource not found error
Expected response multi host
- GET /redfish/v1/Systems
  Response should contain all found systems and display them as
    "system0", "system1", ... "systemN"

- GET /redfish/v1/Systems/system
  Response should contain all information for system called "system"
- GET /redfish/v1/Systems/system0
  Response should contain all information for system called "system0"
- GET /redfish/v1/Systems/system1
  Response should contain all information for system called "system1"
- GET /redfish/v1/Systems/system255
  Should return 404 resource not found IF system255 does not exist
- GET /redfish/v1/Systems/foobar
  Should return 404 resource not found error
- GET /redfish/v1/Systems/sysem0
  Should return 404 resource not found error

- GET /redfish/v1/Systems/system/ResetActionInfo
  Response should contain all ResetAction information for system called "system"
- GET /redfish/v1/Systems/system0/ResetActionInfo
  Response should contain all ResetAction information for system called "system"
- GET /redfish/v1/Systems/system1/ResetActionInfo
  Should return 404 resource not found error
- GET /redfish/v1/Systems/foobar/ResetActionInfo
  Response should contain all ResetAction information for system called "system"
- GET /redfish/v1/Systems/sysem0/ResetActionInfo
  Should return 404 resource not found error

- POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset
  Should return 200 OK
- POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset
  Should return 200 OK
- POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset
  Should return 404 resource not found error
- POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset
  Should return 404 resource not found error
- POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset
  Should return 404 resource not found error

Response of local testing in QEMU

Response single host

GET /redfish/v1/Systems

{
  "@odata.id": "/redfish/v1/Systems",
  "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Computer System Collection"
}

GET /redfish/v1/Systems/system

{
  "@odata.id": "/redfish/v1/Systems/system",
  "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
      "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
    }
  },
  "Bios": {
    "@odata.id": "/redfish/v1/Systems/system/Bios"
  },
  "Boot": {
    "AutomaticRetryAttempts": 3,
    "AutomaticRetryConfig": "RetryAttempts",
    "AutomaticRetryConfig@Redfish.AllowableValues": [
      "Disabled",
      "RetryAttempts"
    ],
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "UEFI",
    "BootSourceOverrideMode@Redfish.AllowableValues": [
      "Legacy",
      "UEFI"
    ],
    "BootSourceOverrideTarget": "None",
    "BootSourceOverrideTarget@Redfish.AllowableValues": [
      "None",
      "Pxe",
      "Hdd",
      "Cd",
      "Diags",
      "BiosSetup",
      "Usb"
    ],
    "RemainingAutomaticRetryAttempts": 3,
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "BootProgress": {
    "LastState": "None",
    "LastStateTime": "1970-01-01T00:00:00.000000+00:00"
  },
  "Description": "Computer System",
  "FabricAdapters": {
    "@odata.id": "/redfish/v1/Systems/system/FabricAdapters"
  },
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "Id": "system",
  "IndicatorLED": "Off",
  "LastResetTime": "1970-01-01T00:00:00+00:00",
  "Links": {
    "Chassis": [
      {
        "@odata.id": "/redfish/v1/Chassis/chassis"
      }
    ],
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Systems/system/LogService"
  },
  "Memory": {
    "@odata.id": "/redfish/v1/Systems/system/Memory"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "system",
  "PCIeDevices": [],
  "PCIeDevices@odata.count": 0,
  "PowerRestorePolicy": "AlwaysOff",
  "PowerState": "Off",
  "ProcessorSummary": {
    "Count": 0
  },
  "Processors": {
    "@odata.id": "/redfish/v1/Systems/system/Processors"
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Disabled"
  },
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/system/Storage"
  },
  "SystemType": "Physical"
}

GET /redfish/v1/Systems/system0

{
  "@odata.id": "/redfish/v1/Systems/system",
  "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
      "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
    }
  },
  "Bios": {
    "@odata.id": "/redfish/v1/Systems/system/Bios"
  },
  "Boot": {
    "AutomaticRetryAttempts": 3,
    "AutomaticRetryConfig": "RetryAttempts",
    "AutomaticRetryConfig@Redfish.AllowableValues": [
      "Disabled",
      "RetryAttempts"
    ],
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "UEFI",
    "BootSourceOverrideMode@Redfish.AllowableValues": [
      "Legacy",
      "UEFI"
    ],
    "BootSourceOverrideTarget": "None",
    "BootSourceOverrideTarget@Redfish.AllowableValues": [
      "None",
      "Pxe",
      "Hdd",
      "Cd",
      "Diags",
      "BiosSetup",
      "Usb"
    ],
    "RemainingAutomaticRetryAttempts": 3,
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "BootProgress": {
    "LastState": "None",
    "LastStateTime": "1970-01-01T00:00:00.000000+00:00"
  },
  "Description": "Computer System",
  "FabricAdapters": {
    "@odata.id": "/redfish/v1/Systems/system/FabricAdapters"
  },
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "Id": "system",
  "IndicatorLED": "Off",
  "LastResetTime": "1970-01-01T00:00:00+00:00",
  "Links": {
    "Chassis": [
      {
        "@odata.id": "/redfish/v1/Chassis/chassis"
      }
    ],
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Systems/system/LogService"
  },
  "Memory": {
    "@odata.id": "/redfish/v1/Systems/system/Memory"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "system",
  "PCIeDevices": [],
  "PCIeDevices@odata.count": 0,
  "PowerRestorePolicy": "AlwaysOff",
  "PowerState": "Off",
  "ProcessorSummary": {
    "Count": 0
  },
  "Processors": {
    "@odata.id": "/redfish/v1/Systems/system/Processors"
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Disabled"
  },
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/system/Storage"
  },
  "SystemType": "Physical"
}

GET /redfish/v1/Systems/system1

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'system1' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "system1"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'system1' was not found."
  }
}

GET /redfish/v/fileSystems/sysem0

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'sysem0' was not found."
  }
}

GET /redfish/v1/Systems/foobar

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'foobar' was not found."
  }
}

GET /redfish/v1/Systems/system/ResetActionInfo

{
  "@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
  "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
  "Id": "ResetActionInfo",
  "Name": "Reset Action Info",
  "Parameters": [
    {
      "AllowableValues": [
        "On",
        "ForceOff",
        "ForceOn",
        "ForceRestart",
        "GracefulRestart",
        "GracefulShutdown",
        "PowerCycle",
        "Nmi"
      ],
      "DataType": "String",
      "Name": "ResetType",
      "Required": true
    }
  ]
}

GET /redfish/v1/Systems/system0/ResetActionInfo

{
  "@odata.id": "/redfish/v1/Systems/system0/ResetActionInfo",
  "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
  "Id": "ResetActionInfo",
  "Name": "Reset Action Info",
  "Parameters": [
    {
      "AllowableValues": [
        "On",
        "ForceOff",
        "ForceOn",
        "ForceRestart",
        "GracefulRestart",
        "GracefulShutdown",
        "PowerCycle",
        "Nmi"
      ],
      "DataType": "String",
      "Name": "ResetType",
      "Required": true
    }
  ]
}

GET /redfish/v1/Systems/system1/ResetActionInfo

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'system1' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "system1"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'system1' was not found."
  }
}

GET /redfish/v1/Systems/sysem0/ResetActionInfo

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'sysem0' was not found."
  }
}

GET /redfish/v1/Systems/foobar/ResetActionInfo

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'foobar' was not found."
  }
}

POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset

{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.16.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset

{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.16.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'system1' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "system1"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The parameter GracefulRestart for the action Reset is not supported on the target resource.",
        "MessageArgs": [
          "GracefulRestart",
          "Reset"
        ],
        "MessageId": "Base.1.16.0.ActionParameterNotSupported",
        "MessageSeverity": "Warning",
        "Resolution": "Remove the parameter supplied and resubmit the request if the operation failed."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}

POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The parameter GracefulRestart for the action Reset is not supported on the target resource.",
        "MessageArgs": [
          "GracefulRestart",
          "Reset"
        ],
        "MessageId": "Base.1.16.0.ActionParameterNotSupported",
        "MessageSeverity": "Warning",
        "Resolution": "Remove the parameter supplied and resubmit the request if the operation failed."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}

POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The parameter GracefulRestart for the action Reset is not supported on the target resource.",
        "MessageArgs": [
          "GracefulRestart",
          "Reset"
        ],
        "MessageId": "Base.1.16.0.ActionParameterNotSupported",
        "MessageSeverity": "Warning",
        "Resolution": "Remove the parameter supplied and resubmit the request if the operation failed."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}
Response multi host GET /redfish/v1/Systems
{
  "@odata.id": "/redfish/v1/Systems",
  "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/system0"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Computer System Collection"
}

GET /redfish/v1/Systems/system

{
  "@odata.id": "/redfish/v1/Systems/system0",
  "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/system0/ResetActionInfo",
      "target": "/redfish/v1/Systems/system0/Actions/ComputerSystem.Reset"
    }
  },
  "Bios": {
    "@odata.id": "/redfish/v1/Systems/system0/Bios"
  },
  "Boot": {
    "AutomaticRetryAttempts": 3,
    "AutomaticRetryConfig": "RetryAttempts",
    "AutomaticRetryConfig@Redfish.AllowableValues": [
      "Disabled",
      "RetryAttempts"
    ],
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "UEFI",
    "BootSourceOverrideMode@Redfish.AllowableValues": [
      "Legacy",
      "UEFI"
    ],
    "BootSourceOverrideTarget": "None",
    "BootSourceOverrideTarget@Redfish.AllowableValues": [
      "None",
      "Pxe",
      "Hdd",
      "Cd",
      "Diags",
      "BiosSetup",
      "Usb"
    ],
    "RemainingAutomaticRetryAttempts": 3,
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "BootProgress": {
    "LastState": "None",
    "LastStateTime": "1970-01-01T00:00:00.000000+00:00"
  },
  "Description": "Computer System",
  "FabricAdapters": {
    "@odata.id": "/redfish/v1/Systems/system0/FabricAdapters"
  },
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "Id": "system0",
  "IndicatorLED": "Off",
  "LastResetTime": "1970-01-01T00:00:00+00:00",
  "Links": {
    "Chassis": [
      {
        "@odata.id": "/redfish/v1/Chassis/chassis"
      }
    ],
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Systems/system0/LogService"
  },
  "Memory": {
    "@odata.id": "/redfish/v1/Systems/system0/Memory"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "system0",
  "PCIeDevices": [],
  "PCIeDevices@odata.count": 0,
  "PowerRestorePolicy": "AlwaysOff",
  "PowerState": "Off",
  "ProcessorSummary": {
    "Count": 0
  },
  "Processors": {
    "@odata.id": "/redfish/v1/Systems/system0/Processors"
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Disabled"
  },
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/system0/Storage"
  },
  "SystemType": "Physical"
}

GET /redfish/v1/Systems/system0

{
  "@odata.id": "/redfish/v1/Systems/system0",
  "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/system0/ResetActionInfo",
      "target": "/redfish/v1/Systems/system0/Actions/ComputerSystem.Reset"
    }
  },
  "Bios": {
    "@odata.id": "/redfish/v1/Systems/system0/Bios"
  },
  "Boot": {
    "AutomaticRetryAttempts": 3,
    "AutomaticRetryConfig": "RetryAttempts",
    "AutomaticRetryConfig@Redfish.AllowableValues": [
      "Disabled",
      "RetryAttempts"
    ],
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "UEFI",
    "BootSourceOverrideMode@Redfish.AllowableValues": [
      "Legacy",
      "UEFI"
    ],
    "BootSourceOverrideTarget": "None",
    "BootSourceOverrideTarget@Redfish.AllowableValues": [
      "None",
      "Pxe",
      "Hdd",
      "Cd",
      "Diags",
      "BiosSetup",
      "Usb"
    ],
    "RemainingAutomaticRetryAttempts": 3,
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "BootProgress": {
    "LastState": "None",
    "LastStateTime": "1970-01-01T00:00:00.000000+00:00"
  },
  "Description": "Computer System",
  "FabricAdapters": {
    "@odata.id": "/redfish/v1/Systems/system0/FabricAdapters"
  },
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "Id": "system0",
  "IndicatorLED": "Off",
  "LastResetTime": "1970-01-01T00:00:00+00:00",
  "Links": {
    "Chassis": [
      {
        "@odata.id": "/redfish/v1/Chassis/chassis"
      }
    ],
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Systems/system0/LogService"
  },
  "Memory": {
    "@odata.id": "/redfish/v1/Systems/system0/Memory"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "system0",
  "PCIeDevices": [],
  "PCIeDevices@odata.count": 0,
  "PowerRestorePolicy": "AlwaysOff",
  "PowerState": "Off",
  "ProcessorSummary": {
    "Count": 0
  },
  "Processors": {
    "@odata.id": "/redfish/v1/Systems/system0/Processors"
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Disabled"
  },
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/system0/Storage"
  },
  "SystemType": "Physical"
}

GET /redfish/v1/Systems/system1

{
  "@odata.id": "/redfish/v1/Systems/system1",
  "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Systems/system1/ResetActionInfo",
      "target": "/redfish/v1/Systems/system1/Actions/ComputerSystem.Reset"
    }
  },
  "Bios": {
    "@odata.id": "/redfish/v1/Systems/system1/Bios"
  },
  "Boot": {
    "StopBootOnFault": "Never",
    "TrustedModuleRequiredToBoot": "Disabled"
  },
  "Description": "Computer System",
  "FabricAdapters": {
    "@odata.id": "/redfish/v1/Systems/system1/FabricAdapters"
  },
  "GraphicalConsole": {
    "ConnectTypesSupported": [
      "KVMIP"
    ],
    "MaxConcurrentSessions": 4,
    "ServiceEnabled": true
  },
  "Id": "system1",
  "IndicatorLED": "Off",
  "Links": {
    "Chassis": [
      {
        "@odata.id": "/redfish/v1/Chassis/chassis"
      }
    ],
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ]
  },
  "LocationIndicatorActive": false,
  "LogServices": {
    "@odata.id": "/redfish/v1/Systems/system1/LogService"
  },
  "Memory": {
    "@odata.id": "/redfish/v1/Systems/system1/Memory"
  },
  "MemorySummary": {
    "TotalSystemMemoryGiB": 0.0
  },
  "Name": "system1",
  "PCIeDevices": [],
  "PCIeDevices@odata.count": 0,
  "ProcessorSummary": {
    "Count": 0
  },
  "Processors": {
    "@odata.id": "/redfish/v1/Systems/system1/Processors"
  },
  "SerialConsole": {
    "IPMI": {
      "ServiceEnabled": true
    },
    "MaxConcurrentSessions": 15,
    "SSH": {
      "HotKeySequenceDisplay": "Press ~. to exit console",
      "Port": 2200,
      "ServiceEnabled": true
    }
  },
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/system1/Storage"
  },
  "SystemType": "Physical",
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The request failed due to an internal service error.  The service is still operational.",
        "MessageArgs": [],
        "MessageId": "Base.1.16.0.InternalError",
        "MessageSeverity": "Critical",
        "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The request failed due to an internal service error.  The service is still operational.",
        "MessageArgs": [],
        "MessageId": "Base.1.16.0.InternalError",
        "MessageSeverity": "Critical",
        "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The request failed due to an internal service error.  The service is still operational.",
        "MessageArgs": [],
        "MessageId": "Base.1.16.0.InternalError",
        "MessageSeverity": "Critical",
        "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}

GET /redfish/v/fileSystems/sysem0

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'sysem0' was not found."
  }
}

GET /redfish/v1/Systems/foobar

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'foobar' was not found."
  }
}```

GET /redfish/v1/Systems/system/ResetActionInfo

```json
{
  "@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
  "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
  "Id": "ResetActionInfo",
  "Name": "Reset Action Info",
  "Parameters": [
    {
      "AllowableValues": [
        "On",
        "ForceOff",
        "ForceOn",
        "ForceRestart",
        "GracefulRestart",
        "GracefulShutdown",
        "PowerCycle",
        "Nmi"
      ],
      "DataType": "String",
      "Name": "ResetType",
      "Required": true
    }
  ]
}

GET /redfish/v1/Systems/system0/ResetActionInfo

{
  "@odata.id": "/redfish/v1/Systems/system0/ResetActionInfo",
  "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
  "Id": "ResetActionInfo",
  "Name": "Reset Action Info",
  "Parameters": [
    {
      "AllowableValues": [
        "On",
        "ForceOff",
        "ForceOn",
        "ForceRestart",
        "GracefulRestart",
        "GracefulShutdown",
        "PowerCycle",
        "Nmi"
      ],
      "DataType": "String",
      "Name": "ResetType",
      "Required": true
    }
  ]
}

GET /redfish/v1/Systems/system1/ResetActionInfo

{
  "@odata.id": "/redfish/v1/Systems/system1/ResetActionInfo",
  "@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
  "Id": "ResetActionInfo",
  "Name": "Reset Action Info",
  "Parameters": [
    {
      "AllowableValues": [
        "On",
        "ForceOff",
        "ForceOn",
        "ForceRestart",
        "GracefulRestart",
        "GracefulShutdown",
        "PowerCycle",
        "Nmi"
      ],
      "DataType": "String",
      "Name": "ResetType",
      "Required": true
    }
  ]
}

GET /redfish/v1/Systems/sysem0/ResetActionInfo

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'sysem0' was not found."
  }
}

GET /redfish/v1/Systems/foobar/ResetActionInfo

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      }
    ],
    "code": "Base.1.16.0.ResourceNotFound",
    "message": "The requested resource of type ComputerSystem named 'foobar' was not found."
  }
}

POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset

{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.16.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset

{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.16.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The request failed due to an internal service error.  The service is still operational.",
        "MessageArgs": [],
        "MessageId": "Base.1.16.0.InternalError",
        "MessageSeverity": "Critical",
        "Resolution": "Resubmit the request.  If the problem persists, consider resetting the service."
      }
    ],
    "code": "Base.1.16.0.InternalError",
    "message": "The request failed due to an internal service error.  The service is still operational."
  }
}

POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'sysem0' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "sysem0"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The parameter GracefulRestart for the action Reset is not supported on the target resource.",
        "MessageArgs": [
          "GracefulRestart",
          "Reset"
        ],
        "MessageId": "Base.1.16.0.ActionParameterNotSupported",
        "MessageSeverity": "Warning",
        "Resolution": "Remove the parameter supplied and resubmit the request if the operation failed."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}

POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset

{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The requested resource of type ComputerSystem named 'foobar' was not found.",
        "MessageArgs": [
          "ComputerSystem",
          "foobar"
        ],
        "MessageId": "Base.1.16.0.ResourceNotFound",
        "MessageSeverity": "Critical",
        "Resolution": "Provide a valid resource identifier and resubmit the request."
      },
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The request body submitted was malformed JSON and could not be parsed by the receiving service.",
        "MessageArgs": [],
        "MessageId": "Base.1.16.0.MalformedJSON",
        "MessageSeverity": "Critical",
        "Resolution": "Ensure that the request body is valid JSON and resubmit the request."
      }
    ],
    "code": "Base.1.11.0.GeneralError",
    "message": "A general error has occurred. See Resolution for information on how to resolve the error."
  }
}

@mox669 mox669 requested a review from MDr164 December 8, 2023 12:48
@mox669 mox669 requested a review from pointbazaar February 27, 2024 14:29
@mox669 mox669 force-pushed the dev/multi-host-impl branch 2 times, most recently from 2b0ba60 to af944a1 Compare February 27, 2024 14:55
@mox669 mox669 force-pushed the dev/multi-host-impl branch from af944a1 to ea01c9b Compare March 1, 2024 12:37
@mox669 mox669 force-pushed the dev/multi-host-impl branch 4 times, most recently from 28045c1 to d5b9425 Compare April 17, 2024 12:58
@mox669 mox669 force-pushed the dev/multi-host-impl branch from d5b9425 to d60c35a Compare April 24, 2024 18:01
@mox669 mox669 force-pushed the dev/multi-host-impl branch 10 times, most recently from 2e50134 to c885511 Compare May 15, 2024 12:35
@mox669 mox669 force-pushed the dev/multi-host-impl branch 9 times, most recently from 411fc52 to 54989b9 Compare May 16, 2024 16:28
pointbazaar and others added 2 commits June 30, 2025 16:07
To better organize the docs and align with other repos [1],[2],[3],[4]
create a folder for documentation.
Links between the docs have been adjusted to match their new place.

References:
[1] https://github.com/openbmc/phosphor-logging/tree/master/docs
[2] https://github.com/openbmc/entity-manager/tree/master/docs
[3] https://github.com/openbmc/libpldm/tree/main/docs
[4] https://github.com/openbmc/sdbusplus/tree/master/docs

Change-Id: Ibf990d0d78548bc3407b7f98ccf6a650b1744939
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Update description for redfish-updateservice-use-dbus meson option. As
this feature is enabled, drop the temporary and timeline related
statements.

Change-Id: Ie81faeed53f1db7bbd001d9b489d9ea1cb43810f
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
@mox669 mox669 force-pushed the dev/multi-host-impl branch 5 times, most recently from e153400 to 0bd2cdc Compare July 4, 2025 17:58
corey-ethington and others added 6 commits July 7, 2025 13:30
Implements GET and PATCH support for ServiceIdentification in
Managers/bmc and service root.

Tested:
- Refish Service Validator passes
- Tested on romulus:
1. GET initial value
```
curl -k "https://$BMC/redfish/v1"
{
  ...
}
```
ServiceIdentification is not yet present in service root,
as expected
```
curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc"
{
  ...
  "ServiceIdentification": "",
  ...
}
```

2. PATCH and GET with valid value
```
curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \
    -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "foo"}'
{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.19.Success",
      "MessageSeverity": "OK",
      "Resolution": "None."
    }
  ]
}

curl -k "https://$BMC/redfish/v1"
{
  ...
  "ServiceIdentification": "foo",
  ...
}

curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc"
{
  ...
  "ServiceIdentification": "foo",
  ...
}
```

3. PATCH and GET with invalid value
```
curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \
    -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "$$$"}'
{
  "ServiceIdentification@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The value provided for the property ServiceIdentification is not valid.",
      "MessageArgs": [
        "ServiceIdentification"
      ],
      "MessageId": "Base.1.19.PropertyValueError",
      "MessageSeverity": "Warning",
      "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed."
    }
  ]
}

curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \
    -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"}'
{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The string 'ServiceIdentification' exceeds the length limit 99.",
        "MessageArgs": [
          "ServiceIdentification",
          "99"
        ],
        "MessageId": "Base.1.19.StringValueTooLong",
        "MessageSeverity": "Warning",
        "Resolution": "Resubmit the request with an appropriate string length."
      }
    ],
    "code": "Base.1.19.StringValueTooLong",
    "message": "The string 'ServiceIdentification' exceeds the length limit 99."
  }
}

curl -k "https://$BMC/redfish/v1"
{
  ...
  "ServiceIdentification": "foo",
  ...
}

curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc"
{
  ...
  "ServiceIdentification": "foo",
  ...
}
```

Change-Id: I5b71a73e947ec64cabb8d93c8503a18fb43b8937
Signed-off-by: Corey Ethington <cethington@coreweave.com>
These arrays should not be populated if there are no handlers for these
configured.

Fixes openbmc#105

Change-Id: Idbd04eb97ced75e44de6ed98aa1f0d410f0aebc7
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined.  The non-underscore one appears
to be a deprecated alias[1].  Move to the non-deprecated /
underscore-separated variant.

[1]: systemd/systemd@4908de4

Change-Id: I7bf9b444aa8f04eb2b8ded05e502fee47e903639
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Http2 support in bmcweb has been relatively stable for a while.  The
http2 implementation passes all known Redfish tests (some of which
require ported to httpx to support http2), the UI loads, and so far as
the project is concerned, is a complete improvement over the existing
http1 stack.

This commit removes the experimental classification from http2, and
declares it ready for production use, while enabling it by default.
note, that enabling this by default only makes the server advertise that
http2 is available.  Http2 must still be supported by the client to
enable ALPN negotiation, so existing http1 clients that only support
http1 will continue to function as they did before.

Tested: Enabled http option and saw http2 advertised, http2 now takes
effect.

Change-Id: I92843a3afc532f0b2a64904bb872e5d84a1a54fe
Signed-off-by: Ed Tanous <etanous@nvidia.com>
SubordinateOverrides:
  This commit automates the creation of SubordinateOverrides privileges
  structures from the redfish privilege registry. In addition, it
  enhances the function of parse_registries.py.

  It reads SubordinateOverrides privilege registry from DMTF and
  generates const defines SubordinateOverrides for all the privilege
  registry entries in the same format that the Privileges struct
  accepts.

  Moreover, it generates unique const defines for all
  SubordinateOverrides target levels.
  Ex: EthernetInterface SubordinateOverrides has two "Targets":
      ["Manager", "EthernetInterfaceCollection"]. So
      parse_registries.py generates two unique const

      1) Subordinate override for Manager -> EthernetInterface
      2) Subordinate override for Manager ->
         EthernetInterfaceCollection ->  EthernetInterface

  Note: if SubordinateOverrides privilege gets changed, then it
  automatically updates that route privilege, but if
  SubordinateOverrides target gets changed, then the user needs to
  update that manually.

Fix Log_services privileges:
  In Log_services, some of the privileges not following the
  Redfish_1.1.0_PrivilegeRegistry registry.

  This commit contains the following LogServices privileges.

  1) POST method
```
     ComputerSystem -> LogServiceCollection -> LogService
      - POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/
      - POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/
      - POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/
      - POST /LogServices/PostCodes/Actions/LogService.ClearLog/
```

   2) DELETE method
```
     ComputerSystem -> LogServiceCollection -> LogService -> LogEntryCollection -> LogEntry
       - DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/
```

This commit also changes the current privilege

   1) ConfigureManager to ConfigureComponents.

```
    DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>
```

   2) ConfigureCompnents -> ConfigureManager

```
   POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/
   POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/
   POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/
```

Tested: manually tested on Witherspoon system, there is no change in
        output. Run Redfish validator, with all different Privileges;
        Error Get: UUID: String '' does not match pattern ''
        this commit doesn't affect UUID

Email sent to openbmc list:
https://lists.ozlabs.org/pipermail/openbmc/2021-August/027232.html

Change-Id: I37d8a2882f1cfaa59a482083f180fdd0805e2e7d
Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
As the 'experimental-redfish-multi-computer-system' flag is actively
used for development the expiry has been extended.

Tested: Inspection only

Change-Id: I1bbf635a04b87ec59ec2eaabb01173258187092e
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
@mox669 mox669 force-pushed the dev/multi-host-impl branch 2 times, most recently from 4b6d9dc to 4d21a36 Compare July 13, 2025 18:49
Given the size of Redfish schemas these days, it would be nice to be
able to store them on disk in a zstd format.  Unfortunately, not all
clients support zstd at this time.

This commit implements reading of zstd files from disk, as well as
decompressing zstd in the case where the client does not support zstd as
a return type.

Tested:
Implanted an artificial zstd file into the system, and observed correct
decompression both with an allow-encoding header of empty string and
zstd.

Change-Id: I8b631bb943de99002fdd6745340aec010ee591ff
Signed-off-by: Ed Tanous <etanous@nvidia.com>
@mox669 mox669 force-pushed the dev/multi-host-impl branch from 4d21a36 to eddae0d Compare July 16, 2025 19:28
During the transition to using phosphor-settings-defaults-native for
setting the software version, the version field may temporarily be
empty. This change lowers the log severity for that case to avoid
unnecessary warnings during expected intermediate states.

'''
Jun 20 02:41:49 bmc bmcwebd[709]: [error_messages.cpp:1248] Internal Error /usr/src/debug/bmcweb/1.0+git/redfish-core/include/utils/sw_utils.hpp(126:32) `void redfish::sw_util::afterGetProperties(const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&, bool, const std::string&, const std::string&, bool, const boost::system::error_code&, const dbus::utility::DBusPropertiesMap&)`:
'''

Change-Id: I9123278f863fcf04107b42a5996ccb725c1bd870
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
@mox669 mox669 force-pushed the dev/multi-host-impl branch from eddae0d to a6188f5 Compare July 17, 2025 19:56
pointbazaar and others added 10 commits July 21, 2025 16:54
Take advantage of nesting meson files in directories to make things more
readable.

e.g. file path literals become shorter.

Tested: tests still build and pass.

Change-Id: I20cca4f35fb326df33a337bdbadb9811b78962a7
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Modify get/set of LocationIndicatorActive property for Chassis to use
identifying association instead of hard-coding D-Bus path to led
group.[1]

History: Almost 5 years ago IBM added support for this property to the
Chassis.[2] That original implementation assumed 1 chassis and just
looked at the enclosure_identify_blink and enclosure_identify like the
existing IndicatorLED property did.

IBM renamed these functions getSystemLocationIndicatorActive and
setSystemLocationIndicatorActive.[3] These functions are also used by
the system resource.

The interest from other companies has mostly been around IndicatorLED
(old deprecated LED property).[4]

Today, LEDs have the association documented above and used elsewhere
like PowerSupplies, Fans, etc. Switching to this association: 1) follows
the design 2) allows multiple chassis support 3) doesn't assume your
system led is your chassis led.

In the future:
1) system should also move to this association design
2) IndicatorLED should be deprecated - it has been 5 years

This could be put behind a compile flag but this function is broken with
the assumption the system/chassis are the same led. Let's just move to
the new design. IBM drove all these changes in and although other
companies have shown interest around LEDs in Redfish, there hasn't been
much in OpenBMC, so let's just fix.

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58299
[2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/36886
[3] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57765
[4] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40969

Tested:
 - Redfish Service Validator passes
 - Confirm able to set and get LED

1. Get for Chassis
```
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis
{
  "@odata.id": "/redfish/v1/Chassis/chassis",
  "@odata.type": "#Chassis.v1_22_0.Chassis",
  ...
  "LocationIndicatorActive": false,
  ...
}
```

2. Set for Chassis
```
curl -k -H "X-Auth-Token: $token" H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Chassis/chassis
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis
{
  "@odata.id": "/redfish/v1/Chassis/chassis",
  "@odata.type": "#Chassis.v1_22_0.Chassis",
  ...
  "LocationIndicatorActive": true,
  ...
}
```

Change-Id: I78d07f82a8bbf91adb84e53178d3344ba95c9a14
Signed-off-by: Janet Adkins <janeta@us.ibm.com>
Change-Id: Ie481aa8b05903dab59f39a1134463ac0c54aa781
Change-Id: I5cbd3aff607567651ad7caddcf999d95d222a0c5
Change-Id: Iaf9c1c01d44189707579b468f309577df3b6fad5
Change-Id: I5f2511939501d88fd700bcbffcfd810776d6a5b4
This change adds multi-host support in manager.hpp.
Mainly returning all valid redfish links for the ManagerForServers
array. In addition we opt out of calling getMainChassisId when
on multi-host. Needs more clarification what exactly should be
returned for that, if anything.

Testing: TBD

Change-Id: Ia73cabc23cd87128a59df5c7b16af0bf87462925
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host to get a valid collection upon requesting

/redfish/v1/Systems/{computerSystemId}/LogServices/

redfish resource.

All multi-host supported redfish URIs can be found in this listing:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76118

Tested:
Redfish service validation succeeded on romulus and yosemite4. In
addition the route has been curled to see if the correct collection is
returned.

Change-Id: Ic01cdfb18e1c219bf1fc2e0343a45d8ca5d4fa0a
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host for all GET and POST method requests under

/redfish/v1/Systems/{computerSystemId}/LogServices/PostCodes/

redfish resource.

Tested:
Redfish-service-validation passes on single-host machine as well as on
yv4 in qemu.

Every postcode entry is displayed in web-ui on single-host and shown
in the curl output when requested on yv4 qemu.

POST has been tested on single-host hardware inside web-ui and yv4 qemu
machine with curl. (Postcodes have been copied over to the qemu machine
manually from a single-host machine). No regressions observed.
The postcode dir for the specific host is cleared successfully
on both single- and multi-host machine after the POST.

Change-Id: Ie04cb160a1f2756a04be68e6675a6cecc5f09117
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host for all GET and POST method requests under

/redfish/v1/Systems/{computerSystemId}/LogServices/HostLogger/

redfish resource.

Testing: TBD

Change-Id: I026be8106f2accbb77d8d40749f502f3162ad04b
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
@mox669 mox669 force-pushed the dev/multi-host-impl branch from a6188f5 to 58ae26f Compare July 23, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.